<?php 
	$class = ($errors['success'] == "YES") ? "info" : "error";
?>
<div class=<?php echo $class?>>
	<?php if ($errors['success'] == "YES") { 
		echo $errors['message'];
	} else {
		$errors = $errors['errors'];
		foreach ($errors as $error) {?>
			<ul class="styledlist">
				<li> <?php echo $error?> </li>
			</ul>
	<?php } }?>
</div>